<script lang="ts" setup name="UserImg">
import { withDefaults } from 'vue'
import { baseStaticUrl } from '@/libs/utils/baseStaticUrl'

interface Props {
  src?: any
  tip?: string
  localhost?: boolean
}
const props = withDefaults(defineProps<Props>(), {
  src: '',
  tip: '',
  localhost: false
})
const envSrc = computed(() => baseStaticUrl(props.src, props.localhost))
</script>

<template>
  <img :src="envSrc" :alt="props.tip" />
</template>
